<template>
  <div class="mybox">
    <div class="btmcard">
      <div class="btmbox">
        <div class="toptitle toptext">{{ onebox.field_name }}</div>
        <div class="centerdata btm">
          <div class="value">{{ onebox.field_value }}</div>
          <div class="unit">{{ onebox.unit }}</div>
        </div>
        <div class="btmdata">
          <div class="btmtitle">同比</div>
          <div class="bg"></div>
          <div class="btmvalue">{{ onebox.field_value1 }}%</div>
        </div>
        <div class="btmbg"></div>
      </div>
      <div class="btmbox">
        <div class="toptitle toptext" style="line-height: 16px; width: 140px;text-align: center;padding-left: 20px;">{{
          twobox.field_name
        }}</div>
        <div class="centerdata btm">
          <div class="value">{{ twobox.field_value }}</div>
          <div class="unit">{{ twobox.unit }}</div>
        </div>
        <div class="btmbg newbg"></div>
      </div>
      <!-- <div class="btmbox">
        <div class="toptitle toptext">农村务工人数</div>
        <div class="centerdata btm">
          <div class="value">4</div>
          <div class="unit">亿元</div>
        </div>
        <div class="btmdata">
          <div class="btmtitle">同比</div>
          <div class="bg"></div>
          <div class="btmvalue">11%</div>
        </div>
        <div class="btmbg"></div>
      </div>
      <div class="btmbox">
        <div class="toptitle toptext">农村外出就业人员数</div>
        <div class="centerdata btm">
          <div class="value">4</div>
          <div class="unit">亿元</div>
        </div>
        <div class="btmdata">
          <div class="btmtitle">同比</div>
          <div class="bg"></div>
          <div class="btmvalue">11%</div>
        </div>
        <div class="btmbg"></div>
      </div> -->
    </div>
  </div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
  name: '',
  data () {
    return {
      onebox: {},
      twobox: {}
    }
  },
  mounted () {
    this.initData()
  },
  methods: {
    initData () {
      postAction('/topic/data/listAllData/dy_dp_msjc_shjy_gk', {}).then(res => {
        if (res.success) {
          this.onebox = res.result.data[0]
          this.twobox = res.result.data[1]
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.mybox {

  .toptitle {
    text-align: center;
    font-family: Source Han Sans CN;
    font-weight: 500;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 6px;
    margin-top: 53px;
  }

  .toptext {
    margin-bottom: 7px;
  }

  .centerdata {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;

    .value {
      font-family: Microsoft YaHei;
      font-weight: bold;
      font-size: 20px;
      color: #FDDE02;
    }

    .unit {
      font-family: PingFang SC;
      font-weight: 500;
      font-size: 14px;
      color: #F1F1F1;
      margin-top: 5px;
      margin-left: 5px;
    }
  }

  .btm {
    margin-bottom: 0px;
  }

  .btmdata {
    display: flex;
    justify-content: center;

    .btmtitle {
      font-family: Source Han Sans CN;
      font-weight: 400;
      font-size: 14px;
      color: #FFFFFF;
      margin-right: 7px;
    }

    .btmvalue {
      font-family: Source Han Sans CN;
      font-weight: bold;
      font-size: 16px;
      color: #FFFFFF;
    }
  }

  .btmcard {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 13px;

    .btmbox {
      position: relative;
      margin-bottom: 18px;

      .btmbg {
        width: 178px;
        height: 72px;
        background: url('./img/3.png');
        margin-top: -30px;
      }

      .newbg {
        margin-top: -36px;
      }
    }

  }
}
</style>
